package cn.powertime.evaluation.mapper;

import cn.powertime.evaluation.entity.SysRes;
import cn.powertime.evaluation.vo.ReqSysMenuListVo;
import cn.powertime.evaluation.vo.RespSysResAndChildCountVo;
import cn.powertime.evaluation.vo.RespSysResPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 资源表 Mapper 接口
 * </p>
 *
 * @author ZYW
 * @since 2019-09-02
 */
public interface SysResMapper extends BaseMapper<SysRes> {

    List<SysRes> selectZtree();

    List<SysRes> listByUserId(Long userId);

    List<SysRes> buttonsByUserId(@Param("userId") Long userId);

    Page<RespSysResPageVo> mySelectPage(Page page, @Param("vo") ReqSysMenuListVo params);

    Integer batchDel(@Param("ids") List<String> strings);

    List<RespSysResAndChildCountVo> listSysResAndChildCount();

    List<RespSysResAndChildCountVo> tree();
}
